﻿<%template _header%>
<script type="text/javascript">
var templatepath = "{templatepath}";
var postminchars = parseInt({config.minpostsize});
var postmaxchars = parseInt({config.maxpostsize});
var disablepostctrl = parseInt({disablepostctrl});
var attachtransname = "{Scoresets.GetTopicAttachCreditsTransName()}";
var imagedir = "{imagedir}";
var forumtitle = '{config.forumtitle}';
function modaction(action, pid, extra) 
{
    if(!action) 
    {
        return;
    }
    var extra = !extra ? '' : '&' + extra;
    if(!pid && in_array(action, ['delposts', 'banpost'])) 
    {
        var checked = 0;
        var pid = '';
        for(var i = 0; i < $('postsform').elements.length; i++) 
        {
            if($('postsform').elements[i].name.match('topiclist')) 
            {
                checked = 1;
                break;
            }
        }
    } 
    else 
    {
        var checked = 1;
    }
    if(!checked) 
    {
        alert('请选择需要操作的帖子');
    } 
    else 
    {
        floatwinreset = 1;
        $('postsform').action = 'topicadmin.aspx?action='+ action +'&fid={forumid}&tid={topicid}&infloat=1&nopost=1' + (!$('postsform').pid.value ? '' : '&postid=' + $('postsform').pid.value) + extra;
        floatwin('open_mods', '', 250, 220);
        $('floatwin_mods').innerHTML = '';
        ajaxpost('postsform', 'floatwin_mods', '');
        if(is_ie) 
        {
            doane(event);
        }
        hideMenu();
    }
}


function pidchecked(obj) 
{
    if(obj.checked) 
    {
        if(is_ie && !is_opera) 
        {
            var inp = document.createElement('<input name="topiclist[]" />');
        } 
        else 
        {
            var inp = document.createElement('input');
            inp.name = 'topiclist[]';
        }
        inp.id = 'topiclist_' + obj.value;
        inp.value = obj.value;
        inp.style.display = 'none';
        $('postsform').appendChild(inp);
    } 
    else
    {
        $('postsform').removeChild($('topiclist_' + obj.value));
    }
}

var modclickcount = 0;
function modclick(obj, pid) 
{
    if(obj.checked) 
    {
        modclickcount++;
        if($('postsform').pid.value)
            $('postsform').pid.value += "," + pid;
        else
            $('postsform').pid.value = pid;
    } 
    else 
    {
        modclickcount--;
        if(modclickcount > 0)
        {
            $('postsform').pid.value = $('postsform').pid.value.replace("," + pid + ",", ",");
            $('postsform').pid.value = $('postsform').pid.value.replace("," + pid, "");
            $('postsform').pid.value = $('postsform').pid.value.replace(pid + ",", "");
        }
        else
            $('postsform').pid.value = '';
    }
    $('modcount').innerHTML = modclickcount;
    if(modclickcount > 0) 
    {
        var offset = fetchOffset(obj);				
        $('modlayer').style.top = offset['top'] - 65 + 'px';
        $('modlayer').style.left = offset['left'] - 215 + 'px';
        $('modlayer').style.display = '';
    } 
    else 
    {
        $('modlayer').style.display = 'none';
    }
}

</script>
<%if {enabletag}%>
<script type="text/javascript" src="cache/tag/closedtags.txt"></script>
<script type="text/javascript" src="cache/tag/colorfultags.txt"></script>
<%/if%>
<script type="text/javascript"  src="{jsdir}/template_showtopic.js"></script>
<script type="text/javascript" src="{jsdir}/template_share.js"></script>

<%set (int){loopi}=1%>
<%if page_err==0%>
<div id="nav">
	<div class="wrap s_clear">
		<a id="forumlist" href="{forumpath}" <%if {config.forumjump}==1%>onmouseover="showMenu(this.id);" onmouseout="showMenu(this.id);"<%/if%> class="title">{config.forumtitle}</a>  &raquo; {ShowForumAspxRewrite(forum.Pathlist.Trim(),forumid,forumpageid)}
		<%set (int){ishtmltitle} = Topics.GetMagicValue(topic.Magic, MagicType.HtmlTitle)%>
		<%if {ishtmltitle}==1%>
			  &raquo; <strong>{Topics.GetHtmlTitle(topic.Tid)}</strong>
		<%else%>
			  &raquo; <strong>{topic.Title}</strong>
		<%/if%>
	</div>
</div>
<%if {config.forumjump}==1%>
	{Caches.GetForumListMenuDivCache(usergroupid,userid,config.Extname)}
<%/if%>
<%template _pagewordadlist%>
<div class="wrap s_clear thread" id="wrap">
<div class="main viewthread">
	<div id="forumheader" class="s_clear">
		<h1>
		<%if {forum.applytopictype}==1 && {forum.topictypeprefix}==1%>
			<cite>{topictypes}</cite>
		<%/if%>
			{topic.title}	
		</h1>
		<p class="forumstats">[ <em>{topicviews}</em> 查看 / <em>{topic.Replies}</em> 回复 ]</p>
	</div>
	<div class="pages_btns">
		<div class="pages">
			<cite class="pageback">{listlink}</cite>
			<%if {pagecount}!=1%>
			{pagenumbers}
			<%if {pagecount}>8%>
			<kbd><b id="pageidtxt1" title="可以输入页码按回车键自动跳转" onclick="$('pageidtxt1').style.display='none';$('pageidinput1').style.display='';$('pageidinput1').focus();">{pageid}</b>
			    <input name="gopage" type="text" class="txt" id="pageidinput1" value="{pageid}" style="display:none;text-align:center;" onfocus="this.value=this.defaultValue;this.size=this.value.length;this.select();" onblur="$('pageidinput1').style.display='none';$('pageidtxt1').style.display='';" onKeyDown="if(event.keyCode==13) { if({config.aspxrewrite}) {window.location='showtopic-{topicid}-' + (parseInt(this.value) > 0 ? parseInt(this.value) : 1) + '{config.extname}';}else{window.location='showtopic.aspx?topicid={topicid}&page=' + (parseInt(this.value) > 0 ? parseInt(this.value) : 1);}}if((event.keyCode >= 48 && event.keyCode <= 57) || event.keyCode==8){this.size=this.value.length+1;return true;}else{return false;}" size="{pageid.toString().Trim().Length}" maxlength="9" />/ {pagecount}</kbd>
			<%/if%>
			{nextpage}
			<%/if%>
		</div>
	<%if {userid<0}||{canposttopic}%>
		<span onmouseover="if($('newspecial_menu').childNodes.length>0)  showMenu(this.id);" id="newspecial" class="postbtn"><a title="发新话题" id="newtopic" href="posttopic.aspx?forumid={forum.fid}" onmouseover="if($('newspecial_menu').childNodes.length>0)  showMenu(this.id);"  onclick="floatwin('open_newthread', this.href, 600, 410, '600,0');doane(event);"><img alt="发新话题" src="{imagedir}/newtopic.gif"/></a></span>
	<%/if%>
	<%if {userid<0}||{canreply}%>
		<span class="replybtn"><a href="postreply.aspx?topicid={topicid}&forumpage={forumpageid}" onclick="floatwin('open_reply', this.href, 600, 410, '600,0');doane(event);"><img src="{imagedir}/reply.gif" border="0" alt="回复该主题" /></a></span>
	<%/if%>
	</div>
	<form id="postsform" name="postsform" method="post" action="topicadmin.aspx?action=moderate&forumid={forumid}">
	<input name="forumid" type="hidden" value="{forumid}" />
	<input name="topicid" type="hidden" value="{topicid}" />
	<input name="operat" type="hidden" value="delposts" />
	<input name="pid" type="hidden" />
	<%if {ismoder}==1%>
	<div style="display:none;width:165px;" id="modlayer">
    <span>选中</span><strong id="modcount">1</strong><span>篇: </span>
    <a onclick="modaction('banpost')" href="javascript:;">屏蔽</a>
    <a onclick="modaction('delposts')" href="javascript:;">删除</a>
    </div>
	<%/if%>
	<div id="postsContainer">
	<%loop (ShowtopicPagePostInfo) post postlist%>
	<table id="{post.pid}" summary="{post.pid}" cellspacing="0" cellpadding="0" class="topic_table">
		<tbody>
		<tr>
		<td class="postauthor" id="{post.pid}">
		<%if {post.posterid}!=-1%>
			<!-- member menu -->
			<div class="popupmenu_popup userinfopanel" id="{post.posterid}{loopi}" style="display:none; clip: rect(auto auto auto auto); position:absolute;" initialized ctrlkey="userinfo2">
				<div class="popavatar">
					<div id="{post.posterid}{loopi}_ma"></div>
					<ul class="profile_side">
						<li class="post_pm"><a onclick="floatwin('open_postpm', this.href, 600, 410, '600,0');doane(event);" href="usercppostpm.aspx?msgtoid={post.posterid}" target="_blank">发送短消息</a></li>
						<li class="add_friend"><a href="javascript:void(0);" onclick="floatwin('open_friendrequest{post.posterid}', 'friends.aspx?action=createfriendrequest&touid={post.posterid}', 300, 220, '600,0');return false;">加为好友</a></li>
						<%if {useradminid}==1||{useradminid}==2%>
						<li class="edit_user"><a href="modcp.aspx?operation=edituser&op=edit&uid={post.posterid}" target="_blank">编辑该用户</a></li>
						<%/if%>
					</ul>
				</div>
				<div class="popuserinfo">
					<dl class="s_clear">
						<%if {Utils.InArray("uid",userfaceshow)}%><dt>UID</dt><dd>{post.posterid}</dd><%/if%>
						<%if {Utils.InArray("bday",userfaceshow)}%><dt>生日</dt><dd>{post.bday}</dd><%/if%>
						<%if {Utils.InArray("posts",userfaceshow)}%><dt>帖子</dt><dd>{post.posts}</dd><%/if%>
						<%if {Utils.InArray("digestposts",userfaceshow)}%><dt>精华</dt><dd>{post.digestposts}</dd><%/if%>
						<%if {Utils.InArray("credits",userfaceshow)}%><dt>积分</dt><dd>{post.credits}</dd><%/if%>
						<%if {score[1]}!="" && {Utils.InArray("extcredits1",userfaceshow)}%><dt>{score[1]}</dt><dd>{post.extcredits1} {scoreunit[1]}</dd><%/if%>
						<%if {score[2]}!="" && {Utils.InArray("extcredits2",userfaceshow)}%><dt>{score[2]}</dt><dd>{post.extcredits2} {scoreunit[2]}</dd><%/if%>
						<%if {score[3]}!="" && {Utils.InArray("extcredits3",userfaceshow)}%><dt>{score[3]}</dt><dd>{post.extcredits3} {scoreunit[3]}</dd><%/if%>
						<%if {score[4]}!="" && {Utils.InArray("extcredits4",userfaceshow)}%><dt>{score[4]}</dt><dd>{post.extcredits4} {scoreunit[4]}</dd><%/if%>
						<%if {score[5]}!="" && {Utils.InArray("extcredits5",userfaceshow)}%><dt>{score[5]}</dt><dd>{post.extcredits5} {scoreunit[5]}</dd><%/if%>
						<%if {score[6]}!="" && {Utils.InArray("extcredits6",userfaceshow)}%><dt>{score[6]}</dt><dd>{post.extcredits6} {scoreunit[6]}</dd><%/if%>
						<%if {score[7]}!="" && {Utils.InArray("extcredits7",userfaceshow)}%><dt>{score[7]}</dt><dd>{post.extcredits7} {scoreunit[7]}</dd><%/if%>
						<%if {score[8]}!="" && {Utils.InArray("extcredits8",userfaceshow)}%><dt>{score[8]}</dt><dd>{post.extcredits8} {scoreunit[8]}</dd><%/if%>
						<%if {Utils.InArray("gender",userfaceshow)}%><dt>性别</dt><dd><script type="text/javascript">document.write(displayGender({post.gender}));</script></dd><%/if%>
						<%if {Utils.InArray("location",userfaceshow)}%><dt>来自</dt><dd>{post.location}</dd><%/if%>
						<%if {Utils.InArray("oltime",userfaceshow)}%><dt>在线时间</dt><dd>{post.oltime}</dd><%/if%>
						<%if {post.joindate!=""&&Utils.InArray("joindate",userfaceshow)}%><dt>注册时间</dt><dd><%datetostr({post.joindate},"yyyy-MM-dd")%></dd><%/if%>	
						<%if {post.lastvisit!=""&&Utils.InArray("lastvisit",userfaceshow)}%><dt>最后登录</dt><dd><%datetostr({post.lastvisit},"yyyy-MM-dd")%></dd><%/if%>	
					</dl>
					<div class="imicons s_clear">
						<%if {post.msn}!=""%>
						<a href="mailto:{post.msn}" target="_blank" class="msn">{post.msn}</a>
						<%/if%>
						<%if {post.skype}!=""%>
						<a href="skype:{post.skype}" target="_blank" class="skype">{post.skype}</a>
						<%/if%>
						<%if {post.icq}!=""%>
						<a href="http://wwp.icq.com/scripts/search.dll?to={post.icq}" target="_blank" class="icq">{post.icq}</a>
						<%/if%>
						<%if {post.qq}!=""%>
						<a href="http://wpa.qq.com/msgrd?V=1&Uin={post.qq}&Site={config.forumtitle}&Menu=yes" target="_blank" class="qq">{post.qq}</a>
						<%/if%>
						<%if {post.yahoo}!=""%>
						<a href="http://edit.yahoo.com/config/send_webmesg?.target={post.yahoo}&.src=pg" target="_blank" class="yahoo">{post.yahoo}</a>
						<%/if%>
					</div>
					<div class="imicons s_clear">
						<%set {aspxrewriteurl} = this.UserInfoAspxRewrite({post.posterid})%>
						<a href="{aspxrewriteurl}" target="_blank" class="public_info">查看公共资料</a>
						<a href="search.aspx?posterid={post.posterid}" class="all_topic">搜索帖子</a>						
					<%if {useradminid}>0%>
					<%if {admininfo.allowviewip}==1%>
						<a onclick="floatwin('open_getip', this.href, 400, 170, '600,0');doane(event);" href="getip.aspx?pid={post.pid}&topicid={topicid}" title="查看IP" class="ip">查看IP</a>
					<%/if%>
					<%if {admininfo.allowbanuser}==1%>
						<a href="useradmin.aspx?action=banuser&uid={post.posterid}" onclick="floatwin('open_mods', this.href, 250, 270, '600,0');doane(event);" title="禁止用户" class="forbid_user">禁止用户</a>
					<%/if%>
					<%/if%>
					</div>
				</div>
			</div>
			<!-- member menu -->
			<%/if%>
			<%if {post[_id]}=={postlist.count}%>
			<a name="lastpost"></a>
			<%/if%>
		<%if {post.posterid}!=-1%>
			<!--register user-->
			<cite>
				<span <%if {post.onlinestate}==1%>class="onlineyes" title="在线"<%else%>class="onlineno" title="未在线"<%/if%>>{post.poster}</span>
			</cite>
			<div id="{post.posterid}{loopi}_a">
			<%if {config.showavatars}==1%>
			<div class="avatar">
			<%set (string){avatarurl}=Avatars.GetAvatarUrl(post.Posterid) %>
				<img src="{avatarurl}" onerror="this.onerror=null;this.src='{imagedir}/noavatar_medium.gif';"  alt="头像" id="memberinfo_{loopi}" onmouseover="showauthor(this,{post.posterid}{loopi})"/>
			</div>
			<%/if%>
			<%if {post.nickname}!=""%>
				<p><em>{post.nickname}</em></p>
			<%/if%>
			</div>
			<p>
			<script type="text/javascript">
				ShowStars({post.stars}, {config.starthreshold});
			</script>
			</p>
			<ul class="otherinfo">
				<%if {config.userstatusby}==1%>
				<li><label>组别</label>{post.status}</li>
				<%/if%>
				<%if {Utils.InArray("uid",postleftshow)}%><li><label>UID</label>{post.posterid}</li><%/if%>
				<%if {Utils.InArray("bday",postleftshow)}%><li><label>生日</label>{post.bday}</li><%/if%>
				<%if {Utils.InArray("posts",postleftshow)}%><li><label>帖子</label>{post.posts}</li><%/if%>
				<%if {Utils.InArray("digestposts",postleftshow)}%><li><label>精华</label>{post.digestposts}</li><%/if%>
				<%if {Utils.InArray("credits",postleftshow)}%><li><label>积分</label>{post.credits}</li><%/if%>
				<%if {score[1]}!="" && {Utils.InArray("extcredits1",postleftshow)}%><li><label>{score[1]}</label>{post.extcredits1} {scoreunit[1]}</li><%/if%>
				<%if {score[2]}!="" && {Utils.InArray("extcredits2",postleftshow)}%><li><label>{score[2]}</label>{post.extcredits2} {scoreunit[2]}</li><%/if%>
				<%if {score[3]}!="" && {Utils.InArray("extcredits3",postleftshow)}%><li><label>{score[3]}</label>{post.extcredits3} {scoreunit[3]}</li><%/if%>
				<%if {score[4]}!="" && {Utils.InArray("extcredits4",postleftshow)}%><li><label>{score[4]}</label>{post.extcredits4} {scoreunit[4]}</li><%/if%>
				<%if {score[5]}!="" && {Utils.InArray("extcredits5",postleftshow)}%><li><label>{score[5]}</label>{post.extcredits5} {scoreunit[5]}</li><%/if%>
				<%if {score[6]}!="" && {Utils.InArray("extcredits6",postleftshow)}%><li><label>{score[6]}</label>{post.extcredits6} {scoreunit[6]}</li><%/if%>
				<%if {score[7]}!="" && {Utils.InArray("extcredits7",postleftshow)}%><li><label>{score[7]}</label>{post.extcredits7} {scoreunit[7]}</li><%/if%>
				<%if {score[8]}!="" && {Utils.InArray("extcredits8",postleftshow)}%><li><label>{score[8]}</label>{post.extcredits8} {scoreunit[8]}</li><%/if%>
				<%if {Utils.InArray("gender",postleftshow)}%><li><label>性别</label><script type="text/javascript">document.write(displayGender({post.gender}));</script></li><%/if%>
				<%if {Utils.InArray("location",postleftshow)}%><li><label>来自</label>{post.location}</li><%/if%>
				<%if {Utils.InArray("oltime",postleftshow)}%><li><label>在线时间</label>{post.oltime}</li><%/if%>
				<%if {post.joindate!=""&&Utils.InArray("joindate",postleftshow)}%><li><label>注册时间</label><%datetostr({post.joindate},"yyyy-MM-dd")%></li><%/if%>	
				<%if {post.lastvisit!=""&&Utils.InArray("lastvisit",postleftshow)}%><li><label>最后登录</label><%datetostr({post.lastvisit},"yyyy-MM-dd")%></li><%/if%>	
			</ul>
			<%if {config.enablespace}==1 || {config.enablealbum}==1%>
			<ul class="plug">
				<%if {config.enablespace}==1%>
				<li class="space">
				<%if {post.spaceid}>0%><a href="{spaceurl}space/?uid={post.posterid}">个人空间</a><%else%><a href="###" onclick="nospace('{post.poster}');">个人空间</a><%/if%>
				</li>
				<%/if%>
				<%if {config.enablealbum}==1%>
				<li class="album"><a href="showalbumlist.aspx?uid={post.posterid}">相册</a></li>
				<%/if%>
			</ul>
			<%/if%>
			<%if {post.medals}!=""%>
			<div class="medals">{post.medals}</div>
			<%/if%>
		<%else%>
			<cite style="padding-left:15px;">
			    <em id="traveler_ip_{post.pid}" name="traveler_ip" style="display:none">{post.ip}</em>
				<%if {useradminid}>0 && {admininfo.allowviewip}==1%>
					<a href="getip.aspx?pid={post.pid}&topicid={topicid}" onclick="floatwin('open_getip', this.href, 400, 170, '600,0');doane(event);" title="查看IP"><img src="{imagedir}/ip.gif" alt="查看IP"/></a>
				<%/if%>
			</cite>
			<p><em>未注册</em></p>
		<%/if%>	
		</td>
		<td class="postcontent">
			<div class="postinfo">
				<em class="hidden"><a href="{UserInfoAspxRewrite(post.Posterid)}">{post.poster}</a></em>
				<%if {topic.Special}==4%>
				<em>
					<%if {post.debateopinion}==1%>
						正方
					<%else if {post.debateopinion}==2%>
						反方
					<%else%>
					辩论主题 [<a href="{ShowDebateAspxRewrite(topicid)}">辩论模式</a>]
					<%/if%>
				 </em>
				 <%/if%>
				 
				<em>
				<%set (String){olimg} = OnlineUsers.GetGroupImg({post.groupid})%>
			    {olimg}
				<%datetostr({post.postdatetime},"yyyy-MM-dd HH:mm")%></em>
			<%if {post.posterid}!=-1%>
				<em>
			<%if {onlyauthor}=="1" || {onlyauthor}=="2"%>
				<%set {aspxrewriteurl} = this.ShowTopicAspxRewrite({topicid},0)%>
				<a href="{aspxrewriteurl}">显示全部</a>  
			<%else%>
				<%if {topic.posterid}=={post.posterid}%>
				|<a href="showtopic.aspx?topicid={topicid}&forumpage={forumpageid}&onlyauthor=1&posterid={topic.posterid}">只看楼主</a>  
				<%else%>
				|<a href="showtopic.aspx?topicid={topicid}&forumpage={forumpageid}&onlyauthor=2&posterid={post.posterid}">只看该用户</a>  
				<%/if%>
			<%/if%>
				</em>				
			<%/if%>
				<span class="right">
					<a href="###" class="floor" title="复制帖子链接到剪贴板" onclick="setcopy(window.location.toString().replace(/#(.*?)$/ig, '') + '#{post.pid}', '已经复制到剪贴板')">
					<%if {post.postnocustom}!=""%>
					{post.postnocustom}
					<%else%>
					{post.id}<sup>#</sup>
					<%/if%>
					</a>
				</span>    
				<div class="msgfsize right">
					<label style="margin-left:4px;">字体大小: </label>
					<small title="正常" onclick="$('message{post.pid}').className='t_msgfont'"><b>t</b></small>
					<big title="放大" onclick="$('message{post.pid}').className='t_bigfont'"><b>T</b></big>
				</div>
				<div class="change_topic right">
				<%if {userid}!=-1%>
					<%template _report%><span class="pipe">|</span>
					<%if {usergroupinfo.raterange}!="" && {post.posterid}!=-1%>
					<%if {post.layer}!=0%>
					<a href="topicadmin.aspx?action=rate&forumid={forumid}&topicid={topic.tid}&postid={post.pid}&operat=rate" onclick="floatwin('open_mods', this.href, 250, 270);return false;">评分</a><span class="pipe">|</span>
					<%/if%>
					<%/if%>
				<%/if%>
				<%if {ismoder}==1%>
					<%if {post.ratetimes}>0%>
					<a href="topicadmin.aspx?action=cancelrate&forumid={forumid}&topicid={topic.tid}&postid={post.pid}"onclick="floatwin('open_mods', this.href, 600, 410);return false;">撤销评分</a><span class="pipe">|</span>
					<%/if%>
					<%if {post.id}==1 && {topic.special}==2%>
						<%if {topic.replies}>0%>						
					<a href="topicadmin.aspx?action=bonus&forumid={forumid}&topicid={topic.tid}&operat=bonus" onclick="floatwin('open_mods', this.href, 400, 380);return false;">结帖</a><span class="pipe">|</span>
						<%/if%>
					<%/if%>
				<%else%>
					<%if {post.posterid}!=-1 && {userid}=={post.posterid}%>
						<%if {post.id}==1 && {topic.special}==2%>
							<%if {topic.replies}>0%>
					<a href="topicadmin.aspx?action=bonus&forumid={forumid}&topicid={topic.tid}&operat=bonus" onclick="floatwin('open_mods', this.href, 400, 380);return false;">结帖</a><span class="pipe">|</span>
							<%/if%>
						<%/if%>
					<%/if%>
				<%/if%>
				</div>
			</div>	
               <!--silverlight slideshow start-->
            <%if {post.id}==1%>
                <%if {config.silverlight}==1 && {topic.Attachment}==2%>
                 <div class="silverlight"><a onclick="BOX_show('slideShowSilverlight', 500);" href="javascript:void(0);"><img src="{imagedir}/btn_silverlight.gif" alt="银光图片" title="银光图片" style="cursor:pointer;" /></a></div>
                 <script type="text/javascript" src="{rooturl}silverlight/PostAlbum/silverlight.js" reload="1"></script>             
                 <div id="BOX_overlay_sl" style="background: black; position: absolute; z-index:100; filter:alpha(opacity=50);-moz-opacity: 0.6;opacity: 0.6;"></div>                     
                     <div id="slideShowSilverlight" style="clear:both;display:none; width:800px;height:500px;background:black;">
                     <h3 class="float_ctrl">	                             
                            <em>银光图片</em>
		                    <span id="swfclosebtn">
			                   <a href="javascript:;" class="float_close" onclick="BOX_remove('slideShowSilverlight');" title="关闭"> </a>
		                    </span>
	                 </h3>
                     <object data="data:application/x-silverlight-2," type="application/x-silverlight-2" width="800px" height="460px">
            		        <param name="source" value="{rooturl}silverlight/PostAlbum/ClientBin/PostAlbum.xap"/>
            		        <param name="minRuntimeVersion" value="4.0.50401.0" />
            		        <param name="autoUpgrade" value="true" /> 		
                            <param name="background" value="black" />	
            	            <param name="initParams" value="topicid={topicid},forumid={forumid},posterid={posterid},onlyauthor={onlyauthor}" />	  
            			    <a href="http://go.microsoft.com/fwlink/?LinkID=149156&v=4.0.50401.0" style="text-decoration:none" target="_blank">
 			                    <img src="{rooturl}silverlight/PostAlbum/PostAlbum.jpg" alt="安装微软Silverlight控件,即刻使用帖图浏览功能" style="border-style:none"/>
		                    </a>
        	          </object>                 
                    </div>  	    	
			    </div>
                <%/if%>      
            <%/if%>  
            <!--silverlight slideshow end--> 

			
			<div id="ad_thread2_{post[_id]}"></div>
			<div id="ad_thread3_{post[_id]}"></div>
			<div class="postmessage defaultpost">
			<%if {post.invisible}!=-2 || {ismoder}==1%>
				<%if {topic.identify}>0 && {post.id}==1%>
					<div class="threadstamp" onclick="this.style.display='none';"><img src="{topicidentifydir}/{topicidentify.filename}" alt="点击关闭鉴定图章" title="点击关闭鉴定图章" /></div>
				<%/if%>				 
				<%if {ismoder}==1 && {post.invisible}==-2%>
					<div class="hintinfo">提示: 该帖已被屏蔽, 您拥有管理权限, 以下是帖子内容</div>		              
				<%/if%>
					<%if {post.layer}!=0%><h2>{post.title}</h2><%/if%>
				    <div id="topictag"></div>
				    <div id="message{post.pid}" class="t_msgfont">
					    <%if {post.id}==1%>
						    <div id="firstpost">
					    <%/if%>
						    {post.message}
					    <%if {post.id}==1%>
				      </div>
					    <%/if%>
					    <%if {post.id}==1 && {enabletag}%>
			            <script type="text/javascript">function forumhottag_callback(data){ tags = data; }</script>
			            <script type="text/javascript" src="cache/tag/hottags_forum_cache_jsonp.txt"></script>
				            <%set (int){hastag} = Topics.GetMagicValue(topic.Magic, MagicType.TopicTag)%>
				            <%if {hastag}==1%>
					            <script type="text/javascript">getTopicTags({topic.tid});</script>
				            <%else%>
					            <script type="text/javascript">parsetag();</script>
				            <%/if%>
		                <%/if%>
				    </div>
				<%if {post.lastedit}!=""%>
					<div class="lastediter"><img src="{imagedir}/lastedit.gif" alt="最后编辑"/>{post.lastedit}</div>
				<%/if%>
				<%if {attachmentlist.count}>0%>
					<%set (int){currentattachcount} = 0%>
					<%loop (ShowtopicPageAttachmentInfo) attachtemp attachmentlist%>
						<%if {attachtemp.pid}=={post.pid}%>
							<%set {currentattachcount} = {currentattachcount} + 1%>
						<%/if%>
					<%/loop%>
					<%if  {currentattachcount}>0%>
						<%set (int){getattachperm} = attachmentlist[0].Getattachperm%>
						<%if {getattachperm}==1%>
					<div class="postattachlist">
						<div id="BOX_overlay" style="background: #000; position: absolute; z-index:100; filter:alpha(opacity=50);-moz-opacity: 0.6;opacity: 0.6;"></div>
                        <div id="attachpaymentlog" style="display: none; background :Aliceblue;  border:0px solid #999; width:503px; height:443px;"></div>
                        <div id="buyattach" style="display: none; background :Aliceblue; border:0px solid #999; width:503px; height:323px;"></div>
					<%loop (ShowtopicPageAttachmentInfo) attachment attachmentlist%>
						<%if {attachment.pid}=={post.pid}%>
							<%if {attachment.allowread}==1%>
							<%template _attachmentinfo%>
							<%else%>
							<span class="notdown">你的下载权限 {usergroupinfo.readaccess} 低于此附件所需权限 {attachment.readperm}, 你无权查看此附件</span>
							<%/if%>
						<%/if%>
					<%/loop%>
					</div>
						<%else%>
					<div class="notice">
						附件:<em>您所在的用户组无法下载或查看附件</em>
					</div>
						<%/if%>
					<%/if%>
				<%/if%>
				<%if {post.ratetimes}>0%>
					 <%template _ratelog%>
				<%/if%>
				<%if {post.id}==1%>
					<%if {topic.special}==3%>
					<div class="bonusrate">
						<p>本帖得分:</p>
						<div class="attachmentinfo">
							<%loop (BonusLogInfo) bonuslog bonuslogs%>
							    <%if {bonuslog.bonus}>0%>
							    <%if {bonuslog[_id]}!=1%>
									,
								<%/if%>
								<%set {aspxrewriteurl} = this.UserInfoAspxRewrite({bonuslog.answerid})%>
								<%set (string) {unit} = scoreunit[ bonuslog.Extid ]%>
								<%set (string) {name} = score[ bonuslog.Extid ]%>
								<a href="{aspxrewriteurl}">{bonuslog.answername}</a>({name}:{bonuslog.bonus}{unit})
								<%/if%>
							<%/loop%>					
						</div>
					</div>
					<%else if {topic.special}==4%>
					<div class="debate_show">
						<div class="squaretitle">
							<p>正方观点</p>
							{debateexpand.positiveopinion}
						</div>
						<div class="sidetitle">
							<p>反方观点</p>
							{debateexpand.negativeopinion}
						</div>
					</div>
					<%/if%>
					<!--投票部分-->
					<%template _poll%>
					<!--悬赏部分-->
					<%if {topic.special}==2%>
					<div class="special_reward">
						<p class="reward_price">悬赏金额: <strong>{userextcreditsinfo.name} {topic.price} {userextcreditsinfo.unit} </strong></p>
						<div class="specialmsg">
							<table cellspacing="0" cellpadding="0">
								<tbody>
								<tr>
									<td>悬赏的问题解决办法</td>
								</tr>
								</tbody>
							</table>
						</div>
					</div>
					<%/if%>
				<%/if%>
			</div>
			<%if {post.id}==1%>
			<%if {topic.moderated}>0 && {config.moderactions}>0%>
			<div class="mangeinfo">{TopicAdmins.GetTopicListModeratorLog(topicid)}</div>
			<%/if%>
            
            
			<div class="useraction">
            <%if {userid}!=-1%>
				<a href="favorites.aspx?topicid={topicid}&infloat=1" onclick="ajaxmenu(event, this.id, 3000, 0)" id="ajax_favorite">收藏</a>
				<%if {usergroupinfo.raterange}!="" && {post.posterid}!=-1%>
				<a id="ratelink" href="topicadmin.aspx?action=rate&forumid={forumid}&topicid={topic.tid}&postid={post.pid}&operat=rate" onclick="floatwin('open_mods', this.href, 360, 270);return false;">评分</a>
				<%/if%>
			<%/if%>				
				<a onclick="floatwin('open_emailfriend', this.href, 250, 380);return false;" href="misc.aspx?action=emailfriend&tid={topicid}" id="share">分享</a>
				<%if {config.disableshare}==1%>
				<script type="text/javascript">
				function openforward()
				{
				  share.floatwin('{config.sharelist}');
				}
				</script>
				<a href="javascript:void(0)" onclick="openforward()" id="forward">转发</a>
				<%/if%>
			</div>
			<%/if%>
			<%else%>
			<div id="message{post.pid}" class="t_msgfont">
				<div id="ad_thread3_{post[_id]}"></div>
			    <div class='hintinfo'>提示: 该帖被管理员或版主屏蔽</div>
			</div>
			<%/if%>
			<%if {post.invisible}!=-2 || {ismoder}==1%>
			<%if {config.showsignatures}==1%>
			<%if {post.usesig}==1%>
				<%if {post.signature}!=""%>
				<!--签名开始-->
				<div class="postertext">
					<%if {config.maxsigrows}>0%>
						<%set (int){ieheight} = {config.maxsigrows}*19%>
						<%set (float){heightem} = {config.maxsigrows}*1.6f %>
						<div class="signatures" style="max-height:{heightem}em;maxHeightIE:{ieheight}px">{post.signature}</div>
					<%else%>
						{post.signature}
					<%/if%>
				</div>
				<!--签名结束-->
				<%/if%>
			<%/if%>
			<%/if%>
			<%/if%>
		</td>
	</tr>
	</tbody>
	<tbody>
	<tr>
		<td class="postauthor"></td>
		<td class="postcontent postactions">
			<div id="ad_thread1_{post[_id]}"></div>
			<em>
		<%if {canreply}%>           
			<%if {userid}!=-1%>
			<a href="###" onclick="replyToFloor('{post.id}', '{post.poster}', '{post.pid}')" class="fastreply">回复</a>
			<%/if%>
			<a href="postreply.aspx?topicid={topicid}&postid={post.pid}&forumpage={forumpageid}&quote=yes" class="repquote" onclick="floatwin('open_reply', this.href, 600, 410, '600,0');doane(event);">引用</a>
		<%/if%>
		<%if {ismoder}==1%>
			<%if {topic.Special}==4%>
			<a href="editpost.aspx?topicid={topicid}&postid={post.pid}&forumpage={forumpageid}&pageid={pageid}&debate={post.debateopinion}" class="editpost">编辑</a>
			<%else%>
			<a href="editpost.aspx?topicid={topicid}&postid={post.pid}&forumpage={forumpageid}&pageid={pageid}" <%if {topic.Special}==0%>onclick="floatwin('open_edit', this.href, 600, 410, '600,0');doane(event);"<%/if%>  class="editpost">编辑</a>
			 <%/if%>
		<%else%>
			<%if {post.posterid}!=-1 && {userid}=={post.posterid}%>
				<%if {topic.closed}==0%>
					<%if {topic.Special}==4%>
					<a href="editpost.aspx?topicid={topicid}&postid={post.pid}&pageid={pageid}&forumpage={forumpageid}&debate={post.debateopinion}"  class="editpost">编辑</a>
					<%else%>
					<a href="editpost.aspx?topicid={topicid}&postid={post.pid}&pageid={pageid}&forumpage={forumpageid}" <%if {topic.Special}==0%>onclick="floatwin('open_edit', this.href, 600, 410, '600,0');doane(event);"<%/if%>  class="editpost">编辑</a>
					 <%/if%>
				<%/if%>
			<%/if%>
		<%/if%>
			</em>
			<a href="#" onclick="window.scrollTo(0,0)">TOP</a>
			<%if {ismoder}==1%>
			<label for="manage{post.id}">
            <input type="checkbox" value="{post.id}" onclick="pidchecked(this);modclick(this, {post.pid})" id="manage{post.id}"/>管理
            </label>
            <%/if%>
		</td>
	</tr>
	</tbody>
	<tbody>
	<tr class="threadad">
		<td class="postauthor"></td>
		<td class="adcontent">
			<%if {post.id}==1 && {postleaderboardad}!=""%>
			<div id="postleaderboardad">{postleaderboardad}</div>
			<%/if%>
		</td>
	</tr>
	</tbody>
	</table>
	<%set {loopi}={loopi}+1%>
	<%/loop%>
	</div>
	</form>
	<!--ntforumbox end-->
	<div class="forumcontrol s_clear">
	<table cellspacing="0" cellpadding="0" class="narrow">
		<tbody>
		<tr>
		<td class="modaction">
			<%if {useradminid}>0||{usergroupinfo.raterange}!=""||{config.forumjump}==1||({topic.special}==2&&{topic.posterid}=={userid})%>
			<!--forumjumping start-->
			<script type="text/javascript">
				function action_onchange(value,objfrm,postid,banstatus){
					if (value != ''){
						objfrm.operat.value = value;
						objfrm.postid.value = postid;
						if (value != "delete")
						{
							objfrm.action = objfrm.action + '&referer=' + escape(window.location);
						}
						if (value == 'banpost' && typeof(banstatus) != "undefined")
						{
							objfrm.operat.value = value;
							objfrm.action = objfrm.action + "&banstatus=" + banstatus;
							objfrm.submit();
							return;
						}
						if(value == 'delposts' || value == 'banpost'){
							$('postsform').operat.value = value; 
							$('postsform').action = $('postsform').action + '&referer=' + escape(window.location);
							$('postsform').submit();
						}
						else{
							objfrm.submit();
						}
					}
				}
			</script>
			<%set (bool){canuseadminfunc} = {usergroupinfo.raterange}!="" || {usergroupinfo.maxprice}>0 || ({topic.special}==2&&{topic.posterid}=={userid})%>
			<%if {useradminid}>0%>
				<form id="moderate" name="moderate" method="post" action="topicadmin.aspx?action=moderate&forumid={forumid}&infloat=1">
					<input name="forumid" type="hidden" value="{forumid}" />
					<input name="topicid" type="hidden" value="{topicid}" />
					<input name="postid" type="hidden" value="" />
					<input name="operat" type="hidden" value="" />
					<input type="hidden" name="winheight" />
					<input type="hidden" name="optgroup" />
					<%if {ismoder}==1%>
					<span class="dropmenu" onclick="showMenu(this.id)" id="operatSel">主题管理</span>
					<ul style="width: 180px; display: none;" id="operatSel_menu" class="popupmenu_popup headermenu_popup inlinelist">
						<li class="wide"><a onclick="modthreads(1, 'delete');return false;" href="###">删除主题</a></li>
						<li class="wide"><a onclick="modthreads(1, 'bump');return false;" href="###">提沉主题</a></li>
						<li class="wide"><a onclick="modthreads(1, 'close');return false;" href="###">关闭主题</a></li>
						<li class="wide"><a onclick="modthreads(1, 'move');return false;" href="###">移动主题</a></li>
						<li class="wide"><a onclick="modthreads(1, 'copy');return false;" href="###">复制主题</a></li>
						<li class="wide"><a onclick="modthreads(1, 'highlight');return false;" href="###">高亮显示</a></li>
						<li class="wide"><a onclick="modthreads(1, 'digest');return false;" href="###">设置精华</a></li>
						<li class="wide"><a onclick="modthreads(1, 'identify');return false;" href="###">鉴定主题</a></li>
						<li class="wide"><a onclick="modthreads(1, 'displayorder');return false;" href="###">主题置顶</a></li>
						<li class="wide"><a onclick="modthreads(1, 'split');return false;" href="###">分割主题</a></li>
						<li class="wide"><a onclick="modthreads(1, 'merge');return false;" href="###">合并主题</a></li>
						<li class="wide"><a onclick="modthreads(1, 'repair');return false;" href="###">修复主题</a></li>
					</ul>
					<%/if%>
				</form>
			<%else if {canuseadminfunc}%>
				<form id="moderate" name="moderate" method="post" action="topicadmin.aspx?action=moderate&forumid={forumid}"  class="right">
					<input name="forumid" type="hidden" value="{forumid}" />
					<input name="topicid" type="hidden" value="{topicid}" />
					<input name="postid" type="hidden" value="" />
					<input name="operat" type="hidden" value="" />
				</form>
			<%/if%>
			<!--forumjumping end-->
			<%/if%>
		</td>
		<td>
			<div class="pages_btns">
				<div class="pages">
					<cite class="pageback">{listlink}</cite>
					<%if {pagecount}!=1%>
					{pagenumbers}
					<%if {pagecount}>8%>
					<kbd><b id="pageidtxt2" title="可以输入页码按回车键自动跳转" onclick="$('pageidtxt2').style.display='none';$('pageidinput2').style.display='';$('pageidinput2').focus();">{pageid}</b>
						<input name="gopage" type="text" class="txt" id="pageidinput2" value="{pageid}" style="display:none;text-align:center;" onfocus="this.value=this.defaultValue;this.size=this.value.length;this.select();" onblur="$('pageidinput1').style.display='none';$('pageidtxt1').style.display='';" onKeyDown="if(event.keyCode==13) { if({config.aspxrewrite}) {window.location='showtopic-{topicid}-' + (parseInt(this.value) > 0 ? parseInt(this.value) : 1) + '{config.extname}';}else{window.location='showtopic.aspx?topicid={topicid}&page=' + (parseInt(this.value) > 0 ? parseInt(this.value) : 1);}}if((event.keyCode >= 48 && event.keyCode <= 57) || event.keyCode==8){this.size=this.value.length+1;return true;}else{return false;}" size="{pageid.toString().Trim().Length}" maxlength="9" />/ {pagecount}</kbd>
					<%/if%>
					{nextpage}
					<%/if%>
				</div>
				<div class="chg_topic"><a href="showtopic.aspx?forumid={forumid}&forumpage={forumpageid}&topicid={topicid}&go=prev">上一主题</a> | 
				<a href="showtopic.aspx?forumid={forumid}&forumpage={forumpageid}&topicid={topicid}&go=next">下一主题</a></div>
			</div>
		</td>
		</tr>
		</tbody>
	</table>
	</div>
	<%if {canreply}%>
	<%template _ajaxquickreply%>
	<%/if%>
</div>
<%if {userid<0}||{canposttopic}%>
	<ul class="popupmenu_popup newspecialmenu" id="newspecial_menu" style="display: none">
	 <%if {forum.allowspecialonly}<=0%>
		<li><a href="posttopic.aspx?forumid={forum.fid}&forumpage={forumpageid}" onclick="floatwin('open_newthread',  this.href, 600, 410, '600,0');doane(event);">发新主题</a></li>
		<%/if%>
		<%set (int){specialpost} = {forum.allowpostspecial}&1 %>
		<%if {specialpost}==1 && {usergroupinfo.allowpostpoll}==1%>
		<li class="poll"><a href="posttopic.aspx?forumid={forum.fid}&forumpage={forumpageid}&type=poll">发布投票</a></li>
		<%/if%>
		<%set {specialpost} = {forum.allowpostspecial}&4 %>
		<%if {specialpost}==4 && {usergroupinfo.allowbonus}==1%>
			<li class="reward"><a href="posttopic.aspx?forumid={forum.fid}&forumpage={forumpageid}&type=bonus">发布悬赏</a></li>
		<%/if%>
		<%set {specialpost} = {forum.allowpostspecial}&16 %>
		<%if {specialpost}==16 && {usergroupinfo.allowdebate}==1%>
			<li class="debate"><a href="posttopic.aspx?forumid={forum.fid}&forumpage={forumpageid}&type=debate">发起辩论</a></li>
		<%/if%>
	</ul>
<%/if%>
</div>
<script type="text/javascript">
var topictitle = '{topic.Title}';
var maxpage = parseInt('{pagecount}');
var pageid = parseInt('{pageid}');
if(maxpage > 1) {
	document.onkeyup = function(e){
		e = e ? e : window.event;
		var tagname = is_ie ? e.srcElement.tagName : e.target.tagName;
		if(tagname == 'INPUT' || tagname == 'TEXTAREA') return;
		actualCode = e.keyCode ? e.keyCode : e.charCode;
		if (pageid < maxpage && actualCode == 39) {
		    window.location = '{Urls.ShowTopicAspxRewrite(topicid,pageid+1)}';
		}
		if (pageid > 1 && actualCode == 37) {
		    window.location = '{Urls.ShowTopicAspxRewrite(topicid,pageid-1)}';
		}
	}
}
</script>
<script type="text/javascript">
    function ShowDownloadTip() {
        <%if {Scoresets.IsSetDownLoadAttachScore()}%>
        return confirm('下载附件需要:{downloadattachmenttip}.确定下载?');
        <%else%>
        return true;
        <%/if%>
    }
</script>
<%else%>
	<%if {needlogin}%>
		<%template _login%>
	<%else%>
		<div id="nav">
			<div class="wrap s_clear"><a id="forumlist" href="{forumpath}" class="title">{config.forumtitle}</a>  &raquo; <strong>错误提示</strong></div>
		</div>
		<%template _errmsgbox%>
	<%/if%>
<%/if%>
{inpostad}
<%if {config.forumjump}==1%>
	{navhomemenu}
<%/if%>
<%if {showvisitedforumsmenu}%>
<ul class="popupmenu_popup" id="visitedforums_menu" style="display: none">
<%loop (SimpleForumInfo) simpforuminfo visitedforums%>
    <%if {simpforuminfo.Fid}!=forumid%>
    <li><a href="{simpforuminfo.Url}">{simpforuminfo.Name}</a></li>
    <%/if%>
<%/loop%>
</ul>
<%/if%>
<script type="text/javascript">
getuserips();
</script>
<%template _copyright%>
<%template _adlist%>
<%template _footer%>